package cn.chair.entity;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import life.innovation.annotation.orm.Entity;
import life.innovation.annotation.orm.Id;
import life.innovation.model.BaseModel;
import life.innovation.util.JsonDateDeserializer;
import life.innovation.util.JsonDateSerializer;

import java.util.Date;
@Entity
public class WorkOrder extends BaseModel{

    public static final int STATUS_UNDISPOSED = 0;
    public static final int STATUS_DISPOSED = 1;

    @Id
    private int id;
    private String description;
    private int type;
    @JsonSerialize(using = JsonDateSerializer.class)
    @JsonDeserialize(using = JsonDateDeserializer.class)
    private Date createTime;
    private String linkMan;
    private String phone;
    private int status;
    private int userId;
    private String userAccount;

    public WorkOrder(){
        this.status = STATUS_UNDISPOSED;
        this.createTime = new Date();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLinkMan() {
        return linkMan;
    }

    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }
}
